<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="/Public/css/pintuer.css">
<link rel="stylesheet" href="/Public/css/admin.css">
<script src="/Public/js/jquery.js"></script>
<script src="/Public/js/pintuer.js"></script>

<!-- 图片点击放大 -->
<link rel="stylesheet" href="/Public/dist/zoomify.min.css">
<link rel="stylesheet" href="/Public/css/style.css">

<!-- 图片点击放大end -->

</head>
<body>
<div class="panel admin-panel">
<form method="post" class="form-x" action="/index.php/Home/Index/sousuo1">
  <div class="form-group">
    <div class="label">
      <label>商家手机号：</label>
    </div>
    <div class="field">
      <input type="text" class="input" name="phone" value="" style="width:25%; float:left;" value="" data-toggle="hover" data-place="right" data-image=""  />
      <input type="submit" class="button bg-blue margin-left" value="搜索">
    </div>
  </div>
  </div>
</form>
  <div class="panel-head"><strong class="icon-reorder">已通过商家列表</strong></div>
  <div class="padding border-bottom">
  </div>
  <table class="table table-hover text-center">
    <tr>
        <th>商家名称</th>
        <th>商家id</th>
        <th>联系人</th>
        <th>注册电话</th>
		<th>上级</th>
        <th>所在地区</th>
        <th>详细地址</th>
        <th>店铺类型</th>
        <th>店铺简介</th>
        <th>店铺图片1</th>
        <th>店铺图片2</th>
        <th>操作</th>
      </tr>
      <?php if(is_array($list)): $k = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><tr>
            <td>
                <?php echo ($vo["name"]); ?>
            </td>
            <td>
                <?php echo ($vo["shop_id"]); ?>
            </td>
            <td><?php echo ($vo["contacts"]); ?>
            </td>
            <td>
                <font color="#00CC99"><?php echo ($vo["phone"]); ?></font>
            </td>
			<td>
				<?php
 if(!$vo['pid']){ echo '无'; }elseif($vo['is_user']){ $mysql_server_name='127.0.0.1'; $mysql_username='root'; $mysql_password='root'; $mysql_database='cdzx'; $conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password) or die("数据库链接错误") ; mysql_query("set names 'utf8'"); mysql_select_db($mysql_database); $sql ="select * from user where user_Id = ".$vo['pid']; $result = mysql_query($sql,$conn); $row = mysql_fetch_array($result); echo $row['name']; }else{ $mysql_server_name='127.0.0.1'; $mysql_username='root'; $mysql_password='root'; $mysql_database='cdzx'; $conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password) or die("数据库链接错误") ; mysql_query("set names 'utf8'"); mysql_select_db($mysql_database); $sql1 ="select * from shop where shop_id = ".$vo['pid']; $result1 = mysql_query($sql1,$conn); $row1 = mysql_fetch_array($result1); echo $row1['contacts']; } ?>
            </td>
            <td><?php echo ($vo["area"]); ?></td>
            <td><?php echo ($vo["address"]); ?></td>
            <td><?php echo ($vo["type"]); ?></td>
            <td><?php echo ($vo["synopsis"]); ?></td>
            <td><p class="example"><img src="/Public/Uploads/<?php echo ($vo["photo1"]); ?>" alt="" width="70" height="50" /></p></td>
            <td><p class="example"><img src="/Public/Uploads/<?php echo ($vo["photo2"]); ?>" alt="" width="70" height="50" /></p></td>
            <td>
              <div class="button-group"> 
                  <a class="button border-main" href="/index.php/Home/Index/more/id/<?php echo ($vo["shop_id"]); ?>"><span class="icon-edit"></span>详情</a>
                  <a class="button border-yellow" href="/index.php/Home/Index/set/id/<?php echo ($vo["shop_id"]); ?>"><span class="icon-edit"></span>修改</a>  
                  <a class="button border-red" href="/index.php/Home/Index/del/id/<?php echo ($vo["shop_id"]); ?>"><span class="icon-edit"></span> 删除</a> 
              </div>
              </td>
          </tr><?php endforeach; endif; else: echo "" ;endif; ?>
         
      <tr>
        <td colspan="8"><div class="pagelist"> <?php echo ($page); ?> </div></td>
      </tr>
    
  </table>
</div>


</body>

<script src="/Public/js/jquery-2.1.1.min.js" type="text/javascript"></script>
<script src="/Public/dist/zoomify.min.js"></script>
<script type="text/javascript">
  $('.example img').zoomify();
</script>
</html>